#include "aiTank_map.h"


void drawBrick(int initialX, int initialY){


    lcd_drawRegionRed(initialX, initialY, initialX + 16, initialY + 3);
    lcd_drawRegionRed(initialX, initialY + 16 - 3, initialX + 16, initialY + 16);
    lcd_drawRegionRed(initialX, initialY, initialX + 3, initialY + 16);
    lcd_drawRegionRed(initialX + 16 - 3, initialY, initialX + 16, initialY + 16);
    lcd_drawRegionBlack(initialX + 3, initialY + 3, initialX + 16 - 3, initialY + 16 - 3);

}
void drawAllBrick(int initialX, int initialY){
    int i = 0;
    for(i = 0; i < 64; i++){
        if(i == 63){
            drawBrick(initialX + i*16 - 1, initialY);
        }
        else{
            drawBrick(initialX + i*16, initialY);
        }

    }
    for(i = 0; i < 44; i++){
        if(i == 43){
            drawBrick(initialX, initialY + i * 16 - 1);
        }
        else{
            drawBrick(initialX, initialY + i * 16);
        }

    }
    for(i = 0; i < 44; i++){
        if(i == 43){
            drawBrick(initialX + 1007, initialY + i * 16 -1);
        }
        else{
            drawBrick(initialX + 1007, initialY + i * 16);
        }

    }

}

void draw_map(int initialX, int initialY){
    lcd_drawRegionBlack(0, 0, 1023, 64);

    drawAllBrick(initialX, initialY);
    lcd_drawRegionBlack(16, 80, 1007, 767);
}
